package transactions;

/**
 * 
 * @author blackdevil
 * Monitoring on transaction queue, pop and manage transaction
 */
public class TransactionManagerScheduler extends TransactionManagerThread
{	
	
	public TransactionManagerScheduler(
			AbstractTransactionManager abstractTransactionManager) {
		super(abstractTransactionManager);
	}
		

	public void addTransactions(AbstractTransaction transaction)
	{
		synchronized (this.manager.transactions) {
			this.manager.transactions.add(transaction);
			this.manager.transactions.notify();
		}
	}
	
	@Override
	public void run() {
		// TODO Auto-generated method stub
		super.run();
		//schedule
		try {
			AbstractTransaction trans = manager.transactions.take();
			trans.
		} catch (InterruptedException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
	}
}
